<template>
	<view>
		<!-- 配送信息 -->
		<view class="yt-list" show="orderInfo.length == 1">
			<view class="yt-list-cell b-b">
				<text class="cell-tit clamp">配送信息</text>
				<text class="cell-tip"></text>
			</view>
			<view class="yt-list-cell b-b" :key="index" v-for="(de, index) in deliverInfo">
				<text class="cell-tit clamp1">{{de.time | formatTime}}{{de.desc}}</text>
				<text class="cell-tip"></text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: '',
				deliverInfo: []
			}
		},
		async onLoad(option){
			let id = option.id;
			this.getDeliverInfo(option.id);
		},
		methods: {
			async getDeliverInfo(id) {
				// 快递信息
				let res = await this.util.request({
					url: '/v1/ishop/order_deliver/info/' + id,
					method: 'get',
				});
				if (res.code == 200) {
					this.deliverInfo = res.data.dataList;
					console.log(this.deliverInfo);
				}
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: $page-color-base;
		padding-bottom: 100upx;
	}
	.yt-list {
		margin-top: 16upx;
		background: #fff;
	}

	.yt-list-cell {
		display: flex;
		align-items: center;
		padding: 10upx 30upx 10upx 40upx;
		line-height: 70upx;
		position: relative;

		&.cell-hover {
			background: #fafafa;
		}

		&.b-b:after {
			left: 30upx;
		}

		.cell-icon {
			height: 32upx;
			width: 32upx;
			font-size: 22upx;
			color: #fff;
			text-align: center;
			line-height: 32upx;
			background: #f85e52;
			border-radius: 4upx;
			margin-right: 12upx;

			&.hb {
				background: #ffaa0e;
			}

			&.lpk {
				background: #3ab54a;
			}

		}

		.cell-more {
			align-self: center;
			font-size: 24upx;
			color: $font-color-light;
			margin-left: 8upx;
			margin-right: -10upx;
		}

		.cell-tit {
			flex: 1;
			font-size: 26upx;
			color: $font-color-light;
			margin-right: 10upx;
		}

		.cell-tip {
			font-size: 26upx;
			color: $font-color-dark;
			.coupon-info-mini {
				font-size: 12px;
			}
			&.disabled {
				color: $font-color-light;
			}

			&.active {
				color: $uni-color-primary;
			}
			&.red{
				color: $uni-color-primary;
			}
		}

		&.desc-cell {
			.cell-tit {
				max-width: 90upx;
			}
		}

		.desc {
			flex: 1;
			font-size: $font-base;
			color: $font-color-dark;
		}
	}
</style>
